package com.bingxue.edu.management.system.model.req;

import com.bingxue.edu.common.enums.CommonStatusEnum;
import com.bingxue.edu.common.enums.EmployeeTypeEnum;
import com.bingxue.edu.common.enums.GenderEnum;
import com.bingxue.edu.framework.common.validation.Code;
import com.bingxue.edu.framework.common.validation.MobilePhone;
import com.bingxue.edu.framework.common.validation.Name;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * 员工创建请求
 *
 * @author panbo
 * @since 2024/07/10 16:09
 */
@Data
@Schema(description = "员工创建请求")
public class EmployeeCreateReq {

    @Schema(description = "员工编码")
    @Code
    @NotBlank(message = "员工编码不能为空")
    private String code;

    @Schema(description = "姓名")
    @Name
    @NotBlank(message = "员工姓名不能为空")
    private String name;

    @Schema(description = "用户密码")
    @NotBlank(message = "用户密码不能为空")
    @Length(max = 255, message = "用户密码长度不能超过 {max} 个字符")
    private String password;

    @Schema(description = "手机号")
    @MobilePhone
    @NotBlank(message = "员工手机号不能为空")
    private String mobilePhone;

    @Schema(description = "部门id")
    @NotBlank(message = "部门不能为空")
    private String orgId;

    @Schema(description = "性别")
    private GenderEnum gender;

    @Schema(description = "状态")
    private CommonStatusEnum statusEnum;

    @Schema(description = "员工类型")
    private EmployeeTypeEnum type;
}
